{__NOLAYOUT__}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="__PLUGINS__/sweetalert2/sweetalert2.min.css" rel="stylesheet">
<title>跳转提示</title>
</head>
<body>
<script src="__JS__/jquery.min.js"></script>
<script src="__PLUGINS__/sweetalert2/sweetalert2.min.js"></script>
    <script>
        $(function () {
            var msg = "<?php echo(strip_tags($msg));?>";
            var url = "<?php echo($url);?>";
            var wait = "<?php echo($wait);?>";
            <?php switch ($code) { ?>
                <?php case 1:?>
                swal({
                    title: msg,
                    text: '页面自动跳转中... 等待时间:' + wait + '秒',
                    type: 'success',
                    timer: wait * 1000,
                }).then(function(){
                    self.location.href=url;
                },function(dismiss) {
                    if (dismiss === 'timer') {
                        self.location.href=url;
                    }
                });     
                <?php break;?>
                <?php case 0:?>
                    swal({
                        title: msg,
                        text: '页面自动跳转中... 等待时间:' + wait + '秒',
                        type: 'error',
                        timer: wait * 1000,
                    }).then(function(){
                        self.location.href=url;
                    },function(dismiss) {
                        if (dismiss === 'timer') {
                            self.location.href=url;
                        }
                    });     
                <?php break;?>
                <?php } ?>
            });
    </script>
</body>

</html>